Building a Control-flow Graph from Scheduled Assembly Code
نویسندگان
چکیده
A variety of applications have arisen where it is worthwhile to apply code optimizations directly to the machine code (or assembly code) produced by a compiler. These include link-time whole-program analysis and optimization, code compression, binaryto-binary translation, and bit-transition reduction (for power). Many, if not most, optimizations assume the presence of a control-flow graph (cfg). Compiled, scheduled code has properties that can make cfg construction more complex than it is inside a typical compiler. In this paper, we examine the problems of scheduled code on architectures that have multiple delay slots. In particular, if branch delay slots contain other branches, the classic algorithms for building a cfg produce incorrect results. We explain the problem using two simple examples. We then present an algorithm for building correct cfgs from scheduled assembly code that includes branches in branch-delay slots. The algorithm works by building an approximate cfg and then refining it to reflect the actions of delayed branches. If all branches have explicit targets, the complexity of the refining step is linear with respect to the number of branches in the code. Analysis of the kind presented in this paper is a necessary first step for any system that analyzes or translates compiled, assembly-level code. We have implemented this algorithm in our power-consumption experiments based on the TMS320C6200 architecture from Texas Instruments. The development of our algorithm was motivated by the output of TI’s compiler. ∗Authors’ address: Department of Computer Science; Rice University, MS 132; Houston, TX, USA 77005. Corresponding author: [email protected]
منابع مشابه
Generation of Control and Data Flow Graphs from Scheduled and Pipelined Assembly Code
High-level synthesis tools generally convert abstract designs described in a high-level language into a control and data flow graph (CDFG), which is then optimized and mapped to hardware. However, there has been little work on generating CDFGs from highly pipelined software binaries, which complicate the problem of determining data flow propagation and dependencies. This paper presents a method...
متن کاملA multi-objective genetic algorithm (MOGA) for hybrid flow shop scheduling problem with assembly operation
Scheduling for a two-stage production system is one of the most common problems in production management. In this production system, a number of products are produced and each product is assembled from a set of parts. The parts are produced in the first stage that is a fabrication stage and then they are assembled in the second stage that usually is an assembly stage. In this article, the first...
متن کاملFlow Blockage Accident Analysis of Tehran Research Reactor Fuel Assembly
Tehran Research Reactor (T.R.R.) is a pool-type, 5 MW thermal research reactor. One probable event is that if some external objects or debris fall down into the reactor core and cause obstruction of the coolant flow through one of the fuel assemblies, decreasing the surface flow area, ceases the coolant flow, and also raises the fuel and sheaths tempe...
متن کاملAnalysis of path exclusions at the machine code level
We present a method to find static path exclusions in a control flow graph in order to refine the WCET analysis. Using this information, some infeasible paths can be discarded during the ILP-based longest path analysis which helps to improve precision. The new analysis works at the assembly level and uses the Omega library to evaluate Presburger formulas.
متن کاملAnalysis of path exclusion at the machine code level
We present a method to find static path exclusions in a control flow graph in order to refine the WCET analysis. Using this information, some infeasible paths can be discarded during the ILP-based longest path analysis which helps to improve precision. The new analysis works at the assembly level and uses the Omega library to evaluate Presburger formulas.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2001